package com.yic.module.device.controller.admin.device.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static com.yic.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 设备基本信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class DeviceBaseVO {

    @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotNull(message = "设备名称不能为空")
    private String name;

    @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "设备编号不能为空")
    private String code;

    @Schema(description = "规格")
    private String spec;

    @Schema(description = "序列号")
    private String sn;

    @Schema(description = "MAC")
    private String mac;

    @Schema(description = "用途说明")
    private String illustrate;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

    @Schema(description = "设备分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "25101")
    @NotNull(message = "设备分类不能为空")
    private Long categoryId;

    @Schema(description = "供应商", requiredMode = Schema.RequiredMode.REQUIRED, example = "32453")
    @NotNull(message = "供应商不能为空")
    private Long supplierId;

    @Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED, example = "20239")
    @NotNull(message = "品牌不能为空")
    private Long brandId;

    @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "27862")
    @NotNull(message = "单位不能为空")
    private Long unitId;

    @Schema(description = "使用部门", example = "22243")
    private Long deptId;

    @Schema(description = "工作中心", example = "4902")
    private Long centerId;

    @Schema(description = "工厂", example = "4902")
    private Long factoryId;

    @Schema(description = "管理人员")
    private Long adminId;

    @Schema(description = "使用人员")
    private Long userId;

    @Schema(description = "使用位置")
    private String loacation;

    @Schema(description = "设备状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer status;

    @Schema(description = "使用状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer useStatus;

    @Schema(description = "采购日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime procureTime;

    @Schema(description = "图片")
    private String images;

    @Schema(description = "文件")
    private String files;

}
